<template>
  <div>
    <el-col :xl="6" :lg="6" :md="12" :sm="24">
            <el-form-item label="刷卡时间:">
              <el-date-picker
                v-model="queryParam.timeScopeTemp"
                type="daterange"
                value-format="yyyy-MM-dd"
                range-separator="至"
                start-placeholder="开始时间"
                end-placeholder="结束时间"
                @change="getDateScope"
              />
            </el-form-item>
          </el-col>
  </div>
</template>

<script>
export default {
  data() {
    return {
      queryParam: {
        timeScopeTemp: [
          this.$moment().clone().subtract(3, 'months').startOf('day').format('YYYY-MM-DD') + ' 00:00:00',
          this.$moment().format('YYYY-MM-DD') + ' 23:59:59'
        ],
        startTime: this.$moment().clone().subtract(3, 'months').startOf('day').format('YYYY-MM-DD') + ' 00:00:00',
        endTime: this.$moment().format('YYYY-MM-DD') + ' 23:59:59'
      },
    }
  },
  methods: {
    // 重置
    searchReset() {
      this.queryParam = {
        timeScopeTemp: [
          this.$moment().clone().subtract(3, 'months').startOf('day').format('YYYY-MM-DD') + ' 00:00:00',
          this.$moment().format('YYYY-MM-DD') + ' 23:59:59'
        ],
        startTime: this.$moment().clone().subtract(3, 'months').startOf('day').format('YYYY-MM-DD') + ' 00:00:00',
        endTime: this.$moment().format('YYYY-MM-DD') + ' 23:59:59'
      }
      this.loadData(1)
    },
  }
}
</script>

<style lang="scss" scoped>
</style>
